-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test(stackflow): Add id/time Test Code #405
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
ssi02014
force-pushed
the
test/stackflow
branch
from
August 5, 2023 17:26
b743230
to
8f06a03
Compare
malangcat
requested changes
Aug 7, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
리뷰 코멘트는 Conventional Comments 형식을 따르고 있습니다. 기여해주셔서 감사합니다.
malangcat
approved these changes
Aug 7, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
기여해주셔서 감사합니다.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
안녕하세요 👋
core/utils 내부의
id()
와time()
함수에 대한 테스트 코드를 추가하는 작업을 진행해봤습니다.적절한 Pull Request인지 검토부탁드립니다 🙏
요약
jest에서 제공해주는
useFakeTimer()
를 통해 파일 내의 테스트에 가짜 타이머를 적용 후,setSystemTime()
을 통해 현재 시스템 시간을 설정해time()
함수와 이에 의존하는id()
함수의 테스트 코드를 작성하였습니다.테스트 결과
참고
jest - useFakeTimers
jest - setSystemTime